package com.ruoyi.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * 省-市-区对象 province_city_region
 * 
 * @author dam
 * @date 2023-07-14
 */
@Data
public class ProvinceCityRegion {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 是否删除 0：未删除 1：已删除 */
    @Excel(name = "是否删除 0：未删除 1：已删除")
    private Long isDeleted;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 类型 0：省 1：市 2：区 */
    @Excel(name = "类型 0：省 1：市 2：区")
    private Long type;

    /** 没有父元素设置为-1 */
    @Excel(name = "没有父元素设置为-1")
    private Long parentId;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("isDeleted", getIsDeleted())
            .append("name", getName())
            .append("type", getType())
            .append("parentId", getParentId())
            .toString();
    }
}
